{include file='index/header.html'}

<!-- 主体 -->
<div class="container">
    <div class="row">
        <!-- 左侧列表 -->
        <div class="col-md-8">

            <!-- 内容详情 -->
            {assign var = 'zero' value = 0}
            <div class="panel panel-default">
                <div class="panel-body">
                    <h1 class="text-center" id="title">{if $article}{$article.title}{else}无标题{/if}</h1>
                    <br>
                    <!-- 元信息 -->
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="pull-left">
                                <span class="glyphicon glyphicon-time text-muted" aria-hidden="true"></span>
                                {if $article}{$article.create_at|date:m/d/y}{else}{$zero|date:m/d/y}{/if} &nbsp;&nbsp;
                                <span class="glyphicon glyphicon-eye-open text-muted" aria-hidden="true"></span>
                                <span class="post-views">{if $article}{$article.views}{else}{$zero}{/if}</span> &nbsp;&nbsp;
                            </div>
                            <div class="pull-right">
                                <span class="glyphicon glyphicon-folder-open text-muted" aria-hidden="true"></span>&nbsp; 
                                {if $category}<a href="{$category.link}" title="{$category.name|strip_tags}">{$category.name}</a>{else}未分类{/if}
                            </div>
                        </div>
                    </div>
                    <!-- 工具条 -->
                    <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
                        <!-- 语音播报 -->
                        {if isset($setting['voice_read']) && $setting.voice_read == '1'}
                        <div class="btn-group pull-left" role="group" aria-label="First group">
                            <button type="button" class="btn btn-default" disabled="disabled" aria-label="Left Align">
                                <span class="glyphicon glyphicon-headphones" aria-hidden="true"></span>
                            </button>
                            <button type="button" class="btn btn-default btn-play" aria-label="Left Align">
                                <span class="glyphicon glyphicon-play" aria-hidden="true"></span>
                            </button>
                        </div>
                        {else}
                        <div class="btn-group pull-left" role="group" aria-label="First group">
                            <a href="javascript:;" role="button" title="客户端" class="btn btn-default client" aria-label="Left Align">
                                <span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span> 客户端
                            </a>
                        </div>
                        {/if}
                        <!-- 字号放大缩小 -->
                        <div class="btn-group pull-right ignore" role="group" aria-label="Second group">
                            <button type="button" class="btn btn-default font-zoom" data-size="bigger" aria-label="Right Align">
                                A <sup>+</sup>
                            </button>
                            <button type="button" class="btn btn-default font-zoom" data-size="smaller" aria-label="Right Align">
                                A <sup>-</sup>
                            </button>
                        </div>
                    </div>
                    <div id="loading"></div>
                    <!-- 内容区 -->
                    <div class="entry-content">
                        {if $article && $article.description}
                        <p class="lead">{$article.description}</p>
                        {/if}
                        {if $article}{$article.content}{else}还没有内容信息{/if}
                    </div>
                    <!-- 分享按钮 -->
                    <div class="share-container text-center">
                        <span class="share-to">
                            <svg class="share-icon" viewBox="0 0 32 32">
                                <path d="M27 22c-1.411 0-2.685 0.586-3.594 1.526l-13.469-6.734c0.041-0.258 0.063-0.522 0.063-0.791s-0.022-0.534-0.063-0.791l13.469-6.734c0.909 0.94 2.183 1.526 3.594 1.526 2.761 0 5-2.239 5-5s-2.239-5-5-5-5 2.239-5 5c0 0.269 0.022 0.534 0.063 0.791l-13.469 6.734c-0.909-0.94-2.183-1.526-3.594-1.526-2.761 0-5 2.239-5 5s2.239 5 5 5c1.411 0 2.685-0.586 3.594-1.526l13.469 6.734c-0.041 0.258-0.063 0.522-0.063 0.791 0 2.761 2.239 5 5 5s5-2.239 5-5c0-2.761-2.239-5-5-5z" fill="#777777"></path>
                            </svg>
                        </span>
                        <!-- 微信 -->
                        <a href="javascript:;" rel="nofollow" class="share-btn wechat" data-platform="wechat" title="微信">
                            <svg class="share-icon" viewBox="0 0 32 28">
                                <path d="M9.063 7.203c0-0.859-0.562-1.422-1.422-1.422-0.844 0-1.703 0.562-1.703 1.422 0 0.844 0.859 1.406 1.703 1.406 0.859 0 1.422-0.562 1.422-1.406zM20.672 15.125c0-0.562-0.562-1.125-1.422-1.125-0.562 0-1.125 0.562-1.125 1.125 0 0.578 0.562 1.141 1.125 1.141 0.859 0 1.422-0.562 1.422-1.141zM16.984 7.203c0-0.859-0.562-1.422-1.406-1.422-0.859 0-1.703 0.562-1.703 1.422 0 0.844 0.844 1.406 1.703 1.406 0.844 0 1.406-0.562 1.406-1.406zM26.906 15.125c0-0.562-0.578-1.125-1.422-1.125-0.562 0-1.125 0.562-1.125 1.125 0 0.578 0.562 1.141 1.125 1.141 0.844 0 1.422-0.562 1.422-1.141zM22.75 8.922c-0.359-0.047-0.719-0.063-1.094-0.063-5.375 0-9.625 4.016-9.625 8.953 0 0.828 0.125 1.625 0.359 2.375-0.359 0.031-0.703 0.047-1.062 0.047-1.422 0-2.547-0.281-3.969-0.562l-3.953 1.984 1.125-3.406c-2.828-1.984-4.531-4.547-4.531-7.656 0-5.391 5.094-9.625 11.328-9.625 5.563 0 10.453 3.391 11.422 7.953zM32 17.687c0 2.547-1.687 4.813-3.969 6.516l0.859 2.828-3.109-1.703c-1.141 0.281-2.281 0.578-3.406 0.578-5.391 0-9.625-3.687-9.625-8.219s4.234-8.219 9.625-8.219c5.094 0 9.625 3.687 9.625 8.219z"></path>
                            </svg>
                        </a>
                        <!-- QQ -->
                        <a href="javascript:;" rel="nofollow" class="share-btn qq" data-platform="qq" title="QQ">
                            <svg class="share-icon" viewBox="0 0 28 28">
                                <path d="M4.219 12.594c-0.109-0.266-0.125-0.531-0.125-0.812 0-0.438 0.281-1.141 0.547-1.469-0.016-0.406 0.156-1.234 0.469-1.5 0-2.891 2.234-6.531 4.844-7.781 1.609-0.766 3.297-1.031 5.063-1.031 1.375 0 2.875 0.328 4.156 0.859 3.672 1.547 4.5 4.422 5.281 8.094l0.016 0.078c0.453 0.688 0.859 1.5 0.859 2.344 0 0.422-0.281 0.844-0.281 1.219 0 0.031 0.094 0.156 0.109 0.187 1.344 1.984 2.562 4.141 2.562 6.609 0 0.547-0.297 2.453-1.172 2.453-0.609 0-1.281-1.484-1.5-1.891-0.016-0.016-0.031-0.016-0.047-0.016l-0.078 0.063c-0.5 1.297-1.047 2.516-2.063 3.484 0.891 0.859 2.328 0.781 2.594 2.266-0.078 0.172-0.047 0.359-0.172 0.531-0.891 1.344-3.281 1.516-4.719 1.516-1.906 0-3.453-0.5-5.25-1.031-0.375-0.109-0.938-0.047-1.344-0.094-0.953 1.047-3.281 1.328-4.625 1.328-1.188 0-5.781-0.078-5.781-2.109 0-0.875 0.187-1.125 0.797-1.687 0.484-0.094 0.844-0.359 1.406-0.391 0.078 0 0.141-0.016 0.219-0.031 0.016-0.016 0.031-0.016 0.031-0.063l-0.031-0.047c-1.078-0.25-2.594-2.969-2.828-4.094l-0.078-0.047c-0.109 0-0.156 0.234-0.187 0.313-0.344 0.797-1.156 1.656-2.063 1.75h-0.016c-0.125 0-0.078-0.125-0.172-0.156-0.219-0.516-0.359-0.984-0.359-1.563 0-3.125 1.5-5.437 3.938-7.281z"></path>
                            </svg>
                        </a>
                        <!-- 微博 -->
                        <a href="javascript:;" rel="nofollow" class="share-btn weibo" data-platform="weibo" title="Weibo">
                            <svg class="share-icon" viewBox="0 0 28 28">
                                <path d="M10.547 20.062c0.438-0.719 0.203-1.547-0.531-1.859-0.703-0.297-1.641 0.016-2.078 0.703-0.453 0.703-0.234 1.531 0.469 1.859 0.719 0.328 1.687 0.016 2.141-0.703zM12.016 18.172c0.156-0.281 0.063-0.594-0.219-0.703-0.281-0.094-0.625 0.031-0.781 0.297-0.156 0.281-0.078 0.578 0.203 0.703 0.281 0.109 0.641-0.016 0.797-0.297zM14.734 19.844c-0.938 2.125-3.656 3.281-5.969 2.531-2.234-0.719-3.172-2.922-2.203-4.906 0.969-1.937 3.453-3.031 5.656-2.469 2.297 0.594 3.453 2.75 2.516 4.844zM19.609 17.344c-0.297-3.047-4.297-5.141-8.937-4.688-4.641 0.469-8.141 3.297-7.844 6.344s4.297 5.141 8.937 4.688c4.641-0.469 8.141-3.297 7.844-6.344zM24.422 17.406c0 3.516-5.063 7.938-12.672 7.938-5.812 0-11.75-2.812-11.75-7.453 0-2.422 1.531-5.219 4.172-7.859 3.531-3.531 7.641-5.125 9.188-3.578 0.688 0.672 0.75 1.859 0.313 3.266-0.219 0.719 0.672 0.313 0.672 0.328 2.844-1.203 5.328-1.266 6.234 0.031 0.484 0.688 0.438 1.656 0 2.781-0.203 0.516 0.063 0.594 0.453 0.719 1.609 0.5 3.391 1.703 3.391 3.828zM23.266 7.656c0.891 0.984 1.141 2.344 0.75 3.531-0.156 0.484-0.672 0.75-1.156 0.594s-0.75-0.672-0.594-1.156v0c0.187-0.594 0.063-1.25-0.375-1.734s-1.078-0.672-1.672-0.547v0c-0.5 0.109-1-0.203-1.094-0.703-0.109-0.5 0.203-0.984 0.703-1.094 1.219-0.266 2.547 0.109 3.437 1.109zM26.094 5.109c1.844 2.031 2.328 4.812 1.547 7.25v0c-0.187 0.562-0.781 0.875-1.344 0.688s-0.875-0.781-0.703-1.344v0c0.562-1.734 0.219-3.719-1.094-5.156-1.313-1.453-3.234-2-5.016-1.625-0.578 0.125-1.156-0.25-1.281-0.828s0.25-1.141 0.828-1.266v0c2.516-0.531 5.219 0.234 7.063 2.281z"></path>
                            </svg>
                        </a>
                        <!-- Facebook -->
                        <a href="javascript:;" rel="nofollow" class="share-btn facebook" data-platform="facebook" title="Facebook">
                            <svg class="share-icon" viewBox="0 0 16 28">
                                <path d="M14.984 0.187v4.125h-2.453c-1.922 0-2.281 0.922-2.281 2.25v2.953h4.578l-0.609 4.625h-3.969v11.859h-4.781v-11.859h-3.984v-4.625h3.984v-3.406c0-3.953 2.422-6.109 5.953-6.109 1.687 0 3.141 0.125 3.563 0.187z"></path>
                            </svg>
                        </a>
                        <!-- Twitter -->
                        <a href="javascript:;" rel="nofollow" class="share-btn twitter" data-platform="twitter" title="Twitter">
                            <svg class="share-icon" viewBox="0 0 26 28">
                                <path d="M25.312 6.375c-0.688 1-1.547 1.891-2.531 2.609 0.016 0.219 0.016 0.438 0.016 0.656 0 6.672-5.078 14.359-14.359 14.359-2.859 0-5.516-0.828-7.75-2.266 0.406 0.047 0.797 0.063 1.219 0.063 2.359 0 4.531-0.797 6.266-2.156-2.219-0.047-4.078-1.5-4.719-3.5 0.313 0.047 0.625 0.078 0.953 0.078 0.453 0 0.906-0.063 1.328-0.172-2.312-0.469-4.047-2.5-4.047-4.953v-0.063c0.672 0.375 1.453 0.609 2.281 0.641-1.359-0.906-2.25-2.453-2.25-4.203 0-0.938 0.25-1.797 0.688-2.547 2.484 3.062 6.219 5.063 10.406 5.281-0.078-0.375-0.125-0.766-0.125-1.156 0-2.781 2.25-5.047 5.047-5.047 1.453 0 2.766 0.609 3.687 1.594 1.141-0.219 2.234-0.641 3.203-1.219-0.375 1.172-1.172 2.156-2.219 2.781 1.016-0.109 2-0.391 2.906-0.781z"></path>
                            </svg>
                        </a>
                        <!-- LinkedIn -->
                        <a href="javascript:;" rel="nofollow" class="share-btn linkedin" data-platform="linkedin" title="LinkedIn">
                            <svg class="share-icon" viewBox="0 0 24 28">
                                <path d="M5.453 9.766v15.484h-5.156v-15.484h5.156zM5.781 4.984c0.016 1.484-1.109 2.672-2.906 2.672v0h-0.031c-1.734 0-2.844-1.188-2.844-2.672 0-1.516 1.156-2.672 2.906-2.672 1.766 0 2.859 1.156 2.875 2.672zM24 16.375v8.875h-5.141v-8.281c0-2.078-0.75-3.5-2.609-3.5-1.422 0-2.266 0.953-2.641 1.875-0.125 0.344-0.172 0.797-0.172 1.266v8.641h-5.141c0.063-14.031 0-15.484 0-15.484h5.141v2.25h-0.031c0.672-1.062 1.891-2.609 4.672-2.609 3.391 0 5.922 2.219 5.922 6.969z"></path>
                            </svg>
                        </a>
                        <!-- Pinterest -->
                        <a href="javascript:;" rel="nofollow" class="share-btn pinterest" data-platform="pinterest" title="Pinterest">
                            <svg class="share-icon" viewBox="0 0 20 28">
                                <path d="M0 9.328c0-5.766 5.281-9.328 10.625-9.328 4.906 0 9.375 3.375 9.375 8.547 0 4.859-2.484 10.25-8.016 10.25-1.313 0-2.969-0.656-3.609-1.875-1.188 4.703-1.094 5.406-3.719 9l-0.219 0.078-0.141-0.156c-0.094-0.984-0.234-1.953-0.234-2.938 0-3.187 1.469-7.797 2.188-10.891-0.391-0.797-0.5-1.766-0.5-2.641 0-1.578 1.094-3.578 2.875-3.578 1.313 0 2.016 1 2.016 2.234 0 2.031-1.375 3.938-1.375 5.906 0 1.344 1.109 2.281 2.406 2.281 3.594 0 4.703-5.187 4.703-7.953 0-3.703-2.625-5.719-6.172-5.719-4.125 0-7.313 2.969-7.313 7.156 0 2.016 1.234 3.047 1.234 3.531 0 0.406-0.297 1.844-0.812 1.844-0.078 0-0.187-0.031-0.266-0.047-2.234-0.672-3.047-3.656-3.047-5.703z"></path>
                            </svg>
                        </a>
                        <!-- WhatsApp -->
                        <a href="javascript:;" rel="nofollow" class="share-btn whatsapp" data-platform="whatsapp" title="WhatsApp">
                            <svg class="share-icon" viewBox="0 0 24 28">
                                <path d="M15.391 15.219c0.266 0 2.812 1.328 2.922 1.516 0.031 0.078 0.031 0.172 0.031 0.234 0 0.391-0.125 0.828-0.266 1.188-0.359 0.875-1.813 1.437-2.703 1.437-0.75 0-2.297-0.656-2.969-0.969-2.234-1.016-3.625-2.75-4.969-4.734-0.594-0.875-1.125-1.953-1.109-3.031v-0.125c0.031-1.031 0.406-1.766 1.156-2.469 0.234-0.219 0.484-0.344 0.812-0.344 0.187 0 0.375 0.047 0.578 0.047 0.422 0 0.5 0.125 0.656 0.531 0.109 0.266 0.906 2.391 0.906 2.547 0 0.594-1.078 1.266-1.078 1.625 0 0.078 0.031 0.156 0.078 0.234 0.344 0.734 1 1.578 1.594 2.141 0.719 0.688 1.484 1.141 2.359 1.578 0.109 0.063 0.219 0.109 0.344 0.109 0.469 0 1.25-1.516 1.656-1.516zM12.219 23.5c5.406 0 9.812-4.406 9.812-9.812s-4.406-9.812-9.812-9.812-9.812 4.406-9.812 9.812c0 2.063 0.656 4.078 1.875 5.75l-1.234 3.641 3.781-1.203c1.594 1.047 3.484 1.625 5.391 1.625zM12.219 1.906c6.5 0 11.781 5.281 11.781 11.781s-5.281 11.781-11.781 11.781c-1.984 0-3.953-0.5-5.703-1.469l-6.516 2.094 2.125-6.328c-1.109-1.828-1.687-3.938-1.687-6.078 0-6.5 5.281-11.781 11.781-11.781z"></path>
                            </svg>
                        </a>
                        <!-- Telegram -->
                        <a href="javascript:;" rel="nofollow" class="share-btn telegram" data-platform="telegram" title="Telegram">
                            <svg class="share-icon" viewBox="0 0 28 28">
                                <path d="M18.578 20.422l2.297-10.828c0.203-0.953-0.344-1.328-0.969-1.094l-13.5 5.203c-0.922 0.359-0.906 0.875-0.156 1.109l3.453 1.078 8.016-5.047c0.375-0.25 0.719-0.109 0.438 0.141l-6.484 5.859-0.25 3.563c0.359 0 0.516-0.156 0.703-0.344l1.687-1.625 3.5 2.578c0.641 0.359 1.094 0.172 1.266-0.594zM28 14c0 7.734-6.266 14-14 14s-14-6.266-14-14 6.266-14 14-14 14 6.266 14 14z"></path>
                            </svg>
                        </a>
                        <!-- Email -->
                        <a href="javascript:;" rel="nofollow" class="share-btn email" data-platform="email" title="Email">
                            <svg class="share-icon" viewBox="0 0 32 32">
                                <path d="M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16 16-7.163 16-16-7.163-16-16-16zM8 8h16c0.286 0 0.563 0.061 0.817 0.177l-8.817 10.286-8.817-10.287c0.254-0.116 0.531-0.177 0.817-0.177zM6 22v-12c0-0.042 0.002-0.084 0.004-0.125l5.864 6.842-5.8 5.8c-0.045-0.167-0.069-0.34-0.069-0.517zM24 24h-16c-0.177 0-0.35-0.024-0.517-0.069l5.691-5.691 2.826 3.297 2.826-3.297 5.691 5.691c-0.167 0.045-0.34 0.069-0.517 0.069zM26 22c0 0.177-0.024 0.35-0.069 0.517l-5.8-5.8 5.865-6.842c0.003 0.041 0.004 0.083 0.004 0.125v12z"></path>
                            </svg>
                        </a>
                    </div>
                    <!-- 下载内容 -->
                    <div class="text-center">
                        <div class="btn-group">
                            <a type="button" class="btn btn-info{if !$download} btn-download{/if}" aria-label="Download" href="{if $download}{$download}{else}javascript:;{/if}" title="下载内容"{if $download} download="ID{$article.id|modifier:str_pad(7, '0', STR_PAD_LEFT)}-{$article.title|modifier:preg_split('/\s+/')|modifier:implode('-')}-{$setting.webName}.html"{/if}><span class="glyphicon glyphicon-download-alt" aria-label="Download"></span> 下载内容</a>
                        </div>
                        <div class="btn-group">
                            <button type="button" class="btn btn-warning btn-favorite" aria-label="Favorite" title="收藏文章"><span class="glyphicon glyphicon-star-empty" aria-hidden="true"></span> 收藏文章</button>
                        </div>
                    </div>
                    <br>
                    <!-- 转载申明 -->
                    <div class="well well-sm text-muted">
                        除非特别说明，本博客均为原创，如需转载，请以链接形式标明来源出处。<br>
                        本文博客网址: {if $article}{$article.link}{else}还没有网址{/if}
                    </div>
                    <!-- 点赞 -->
                    <button type="button" class="btn btn-success{if $login} btn-likes{else} login{/if}">
                        <span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>
                        这篇文章很有用
                    </button>
                    <button type="button" class="btn btn-link text-primary" disabled>
                        <span class="glyphicon glyphicon-fire" aria-hidden="true"></span>
                        <span class="post-likes">{if $article}{$article.likes}{else}{$zero}{/if}</span> 人觉得这篇文章很赞
                    </button>
                    <!-- 上一页/下一页 -->
                    <ul class="pager">
                        <li class="previous{if !$main.prev} disabled{/if}">
                            {if $main.prev}
                            <a href="{$main.prev.link}"><span aria-hidden="true">&larr;</span> Older</a>
                            {else}
                            <span aria-hidden="true">&larr; 没有了</span>
                            {/if}
                        </li>
                        <li class="next{if !$main.next} disabled{/if}">
                            {if $main.next}
                            <a href="{$main.next.link}">Newer <span aria-hidden="true">&rarr;</span></a>
                            {else}
                            <span aria-hidden="true">没有了 &rarr;</span>
                            {/if}
                        </li>
                    </ul>
                    <!-- 内容标签 -->
                    {if $main.tags}
                    <hr>
                    <span class="glyphicon glyphicon-tags text-muted" aria-hidden="true"></span> &nbsp;
                    {foreach from="$main.tags" item="item" name="item"}
                    {if !$smarty.foreach.item.first}, {/if}<a href="{$item.link}" title="{$item.name|strip_tags}">{$item.name}</a>
                    {/foreach}
                    {/if}
                </div>
            </div>

            <!-- 相关文章 -->
            {if $main.related}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">相关文章</h3>
                </div>
                <div class="panel-body">
                    <!-- 图文卡片 -->
                    <div class="row">
                        <!-- 卡片循环 -->
                        {foreach from="$main.related" item="item"}
                        <div class="col-sm-4">
                            <div class="thumbnail">
                                <a href="{$item.link}" title="{$item.title|strip_tags}">
                                    <img style="width:100%;height:95px;background-color:#f1f1f1;"
                                        src="{if (isset($setting['cdn_speed']) && $setting.cdn_speed == '1') || !$item.cover}{else}{$item.cover}{/if}"
                                        data-src="{if $item.cover}{$item.cover}{else}{/if}"
                                        alt="{$item.title|strip_tags}"
                                        title="{$item.title|strip_tags}" />
                                </a>
                                <div class="caption">
                                    <h3 style="margin:0;font-size:14.7px;">
                                        <a href="{$item.link}" title="{$item.title|strip_tags}">{$item.title}</a>
                                    </h3>
                                </div>
                            </div>
                        </div>
                        {/foreach}
                        <!-- 卡片循环end -->
                    </div>
                    <!-- 图片卡片end -->
                </div>
            </div>
            {/if}
            <!-- 相关文章end -->

            <!-- 评论区 -->
            <div class="panel panel-default" id="comments">
                <div class="panel-heading">
                    <h3 class="panel-title">发表评论</h3>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-md-12" id="comment-area">
                            <!-- 评论框 -->
                            <form id="commentForm" style="position: relative;">
                                <div class="form-group">
                                    {if $article && $article.can_comment == 0}
                                    <textarea class="form-control" rows="3" name="comment" class="form-control" id="comment" placeholder="评论内容..."{if $setting.can_comment == 1 && !$login} disabled{/if} required></textarea>
                                    {/if}
                                    <!-- 未登录 -->
                                    {if $article && $article.can_comment == 0 && $setting.can_comment == 1 && !$login}
                                    <p style="position: absolute;top: 30%;margin-top: -1rem;left: 50%;margin-left: -8rem;">请 [<a href="javascript:;" class="login" rel="nofollow" title="登录">登录</a>] 后评论</p>
                                    {/if}
                                    <!-- 未登录end -->
                                </div>
                                {if $article && $article.can_comment == 0}
                                <div class="form-group" style="position: relative;text-align: right;">
                                    <input type="hidden" name="post_id" value="{$article.id}" />
                                    <input type="hidden" name="pid" value="0">
                                    {if $login && in_array(88, $login['auth_ids'])}
                                    <input type="hidden" name="can_delete" value="1">
                                    {else}
                                    <input type="hidden" name="can_delete" value="0">
                                    {/if}
                                    <button type="submit" class="btn btn-primary">
                                        <span class="glyphicon glyphicon-send" aria-hidden="true"></span> 发表评论
                                    </button>
                                    <span class="tips" style="position: absolute;left: 0;top: .5rem;"></span>
                                </div>
                                {/if}
                            </form>

                            <!-- 评论列表 -->
                            {if $main.comments}
                            {foreach from="$main.comments" item="item"}
                            <div class="panel panel-default" id="comment-{$item.id}">
                                <div class="panel-body">
                                    <!-- 媒体对象 -->
                                    <div class="media">
                                        <div class="media-left">
                                            <img class="media-object img-circle avatar"
                                                style="width: 64px;height: 64px;background-color: #f1f1f1;"
                                                src="{if (isset($setting['cdn_speed']) && $setting.cdn_speed == '1') || !$item.avatar}{else}{$item.avatar}{/if}"
                                                data-src="{if $item.avatar}{$item.avatar}{else}{/if}"
                                                alt="{$item.nickname|strip_tags}"
                                                title="{$item.nickname|strip_tags}" />
                                        </div>
                                        <div class="media-body">
                                            <h4 class="media-heading"><strong>{if $item.nickname}{$item.nickname}{else}anonymous{/if}</strong> <cite>说道: </cite></h4>
                                            <!-- 评论内容 -->
                                            {$item.comment} {if $login && in_array(88, $login['auth_ids'])} (<a href="javascript:;" rel="nofollow" class="delete-comment text-danger" data-id="{$item.id}" title="删除">删除</a>) {/if}
                                            <div class="clearfix" style="margin: 10px 0;">
                                                <button type="button" data-id="{$item.id}" class="pull-right btn btn-success btn-reply btn-sm media-right">
                                                    <span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> 回复
                                                </button>
                                            </div>
                                            <!-- 回复列表 -->
                                            {foreach from="$item.replies" item="reply" name="reply"}
                                            <div class="media{if $smarty.foreach.reply.index > 4} hidden{/if}" id="comment-{$reply.id}">
                                                <hr style="margin-top: 10px;" />
                                                <div class="media-left">
                                                    <img class="media-object img-circle avatar"
                                                        style="width: 64px;height: 64px;background-color: #f1f1f1;"
                                                        src="{if (isset($setting['cdn_speed']) && $setting.cdn_speed == '1') || !$reply.avatar}{else}{$reply.avatar}{/if}"
                                                        data-src="{if $reply.avatar}{$reply.avatar}{else}{/if}"
                                                        alt="{$reply.nickname|strip_tags}"
                                                        title="{$reply.nickname|strip_tags}" />
                                                </div>
                                                <div class="media-body">
                                                    <h4 class="media-heading">{$reply.nickname} 回复: </h4>
                                                    {$reply.comment} {if $login && in_array(88, $login['auth_ids'])} (<a href="javascript:;" rel="nofollow" class="delete-comment text-danger" data-id="{$reply.id}" title="删除">删除</a>) {/if}
                                                </div>
                                            </div>
                                            <!-- 回复分页 -->
                                            {if $smarty.foreach.reply.last && $smarty.foreach.reply.index > 4}
                                            <nav aria-label="Page navigation">
                                                <hr />
                                                <ul class="pager" data-index="0">
                                                    <li class="disabled" data-type="prev"><a href="javascript:;" rel="nofollow" title="Previous">Previous</a></li>
                                                    <li data-type="next"><a href="javascript:;" rel="nofollow" title="Next">Next</a></li>
                                                    <li data-type="all"><a href="javascript:;" rel="nofollow" title="All">All</a></li>
                                                </ul>
                                            </nav>
                                            {/if}
                                            <!-- 回复分页end -->
                                            {/foreach}
                                            <!-- 回复列表end -->
                                        </div>
                                    </div>
                                    <!-- 媒体对象End -->
                                </div>
                            </div>
                            {/foreach}
                            {else}
                            <p class="text-center text-muted no-comment">还没有评论</p>
                            {/if}
                        </div>
                    </div>

                    <!-- 评论分页 -->
                    {if $article && $article.can_comment == 0}
                    {include file='index/inc/pager.html'}
                    {/if}

                </div>
            </div>
            <!-- 评论区end -->
        </div>

        <!-- 右侧侧栏 -->
        {include file='index/sidebar.html'}

    </div>
</div>

{include file='index/footer.html'}